<template>
  <div class="item">
    <div class="icon-container">
      <slot name="icon"></slot>
    </div>
    <div class="details">
      <h3>
        <slot name="heading"></slot>
      </h3>
      <div class="content">
        <slot></slot>
      </div>
    </div>
  </div>
</template>

<style scoped>
.item {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.3s ease;
  border: 1px solid #e4e7ed;
}

.item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #f0f9ff;
  border-radius: 8px;
  flex-shrink: 0;
}

.icon-container :deep(svg) {
  width: 24px;
  height: 24px;
  color: #409eff;
}

.details {
  flex: 1;
}

.details h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #303133;
}

.content {
  color: #606266;
  line-height: 1.6;
}

.content a {
  color: #409eff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.content a:hover {
  color: #337ecc;
}

.content code {
  background: #f5f7fa;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  color: #e6a23c;
}

@media (max-width: 768px) {
  .item {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  
  .icon-container {
    margin: 0 auto;
  }
  
  .details h3 {
    font-size: 16px;
  }
}
</style>
